from django.db import models
from django.utils import timezone
class History(models.Model):
    CONTENT_TYPE = (
        ('文件', "文件"),
        ('语音', "语音"),
        ('文本', "文本")
    )
    TYPE = (
        ('用户', "用户"),
        ('群组', "群组")
    )
    type = models.CharField(max_length=254, choices=TYPE, default="用户", verbose_name="接收对象类型")
    content_type = models.CharField(max_length=254, choices=CONTENT_TYPE, default="文本", verbose_name="消息内容类型")
    senderAccount = models.CharField(max_length=254, null=True, blank=True, verbose_name="发自帐户")
    accepterAccount = models.CharField(max_length=254, null=True, blank=True, verbose_name="发到帐户")
    content = models.CharField(max_length=254, default="", verbose_name="消息内容")
    createTime = models.DateTimeField(default=timezone.now, verbose_name='创建时间', null=False, blank=False)
